<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="x-ua-compatible" content="ie=edge">

  <title>{{.title}}</title>

  <!-- Font Awesome -->
  <link rel="stylesheet" href="/plugins/fontawesome-free/css/all.min.css">
  <!-- oniconsI -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- daterange picker -->
  <link rel="stylesheet" href="/plugins/daterangepicker/daterangepicker.css">
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Bootstrap Color Picker -->
  <link rel="stylesheet" href="/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- Select2 -->
  <link rel="stylesheet" href="/plugins/select2/css/select2.min.css">
  <link rel="stylesheet" href="/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
  <!-- Bootstrap4 Duallistbox -->
  <link rel="stylesheet" href="/plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/dist/css/adminlte.min.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="/dist/css/google_fonts_source_sans_pro.css" rel="stylesheet">
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to to the body tag
to get the desired effect
|---------------------------------------------------------|
|LAYOUT OPTIONS | sidebar-collapse                        |
|               | sidebar-mini                            |
|---------------------------------------------------------|
-->
<body class="hold-transition sidebar-mini sidebar-collapse">
<div class="wrapper">
  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <!-- Left navbar links -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
      </li>
    </ul>


    <!-- Right navbar links -->
    <ul class="navbar-nav ml-auto">
      <li class="nav-item">
        <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#"><i
            class="fas fa-th-large"></i></a>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="/" class="brand-link">
      <img src="/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
           style="opacity: .8">
      <span class="brand-text font-weight-heavy"><b>Medi-</b>Sys</span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image">
          <img src="/dist/img/avatar3.png" class="img-circle elevation-2" alt="User Image">
        </div>
        <div class="info">
          <a href="#" class="d-block">User</a>
        </div>
      </div>

      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>
    <!-- Main content -->
    <div class="content">
      <div class="container-fluid">
        <div class="col-12">
        <div class="card card-primary">
          <div class="card-header">
            <h3 class="card-title">检索条件</h3>
          </div>
          <div class="card-body">
            <div class="row">

              <div class="col-sm-1">
                <div class="form-group">
                  <label>检索库</label>
                  <select id="dblist" class="form-control select2" style="width: 100%;">
                  </select>
                </div>
                <!-- /.form-group -->
              </div>

              <div class="col-sm-1">
                <div class="form-group">
                  <label>节点</label>
                  <select id="nodelist" class="form-control select2" style="width: 100%;">
                  </select>
                </div>
                <!-- /.form-group -->
              </div>
              <!-- /.col -->

              <div class="col-2">
                <label>患者ID</label>
                <input type="text" id="PatientID" class="form-control" placeholder="any">
              </div>
              <div class="col-2">
                <label>实例ID</label>
                <input type="text" id="StudyInstanceUID" class="form-control" placeholder="any">
              </div>
              <div class="col-3">
                <!-- Date range -->
                <div class="form-group">
                  <label>时间范围：</label>
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input type="text" class="form-control float-right" id="StudyDate">
                  </div>
                  <!-- /.input group -->
                </div>
                <!-- /.form group -->
              </div>
              <div class="col-1">
                <label>起始偏移</label>
                <input type="text" id="SearchOffset" class="form-control" value="1">
              </div>
              <div class="col-1">
                <label>单页数量</label>
                <input type="text" id="SearchLimit" class="form-control" value="10">
              </div>
              <div class="col-1">
                <label>&#12288;</label>
                <button type="search" id='search' class="btn btn-block btn-primary">搜索</button>
              </div>
            </div>
          </div>
          <!-- /.card-body -->
        </div>
        <!-- /.card -->
      </div>
        <!-- /检索条件 -->
        <div class="col-12">
        <div class="card card-info">
          <div class="card-header">
            <h3 class="card-title">查询结果</h3>
          </div>
          <!-- /.card-header -->

          <div class="card-body table-responsive no-padding">
            <div class="row">
              <div class="col-12">
                <table id="resultTable" class="table table-hover">
                  <tbody id="resultTableBody"></tbody>
                </table>
              </div>
            </div>
          </div>
          <!-- /.card-body -->

          <div class="card-footer">
            <div class="float-right" style="width: 10em">
              <a id="btnPrevPage" class="btn btn-info float-left disabled">上一页</a>
              <a id="btnNextPage" class="btn btn-info float-right disabled">下一页</a>
            </div>
          </div>
          <!-- /.card-footer -->
        </div>
      </div>
        <!-- /检索结果 -->
      </div>

      <button type="button" id="image-viewer-btn-show" style="display: none" data-toggle="modal" data-target="#image-viewer"></button>
      <button type="button" id="instance-viewer-btn-show" style="display: none" data-toggle="modal" data-target="#instance-viewer"></button>
      <button type="button" id="messagebox-btn-show" style="display: none"  data-toggle="modal" data-target="#messagebox"></button>
      <button type="button" id="warningbox-btn-show" style="display: none"  data-toggle="modal" data-target="#warningbox"></button>
      <button type="button" id="frozenbox-btn-show" style="display: none"  data-toggle="modal" data-target="#frozenbox"></button>

      <div class="modal fade" id="instance-viewer">
        <div class="modal-dialog" style="max-width: 1100px">
          <div class="modal-content bg-dark">
            <div class="modal-header">
              <div id="instance-viewer-title" class="modal-title" style="width: 1000px;text-align: center"></div>
              <button id="instance-viewer-btn-close" type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span></button>
            </div>
            <div id="instance-viewer-content" class="modal-body" ></div>
          </div>
        </div>
      </div>
      <div class="modal fade" id="image-viewer">
        <div class="modal-dialog modal-lg" style="max-width: 900px">
          <div class="modal-content bg-primary">
            <div class="modal-header">
              <h4 id="image-viewer-title" class="modal-title">影像预览</h4>
              <button id="image-viewer-btn-close" type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
              <div class="text-center">
                <img id="image-viewer-img-content" height="800px" width="800px" src="">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal fade" id="messagebox">
        <div class="modal-dialog modal-lg">
          <div class="modal-content bg-primary">
            <div class="modal-header">
              <h4 class="modal-title">信息</h4>
              <button id="messagebox-btn-close" type="button" style="display: none" class="close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
              <div class="text-center">
                <h2 id="messagebox-content"></h2>
              </div>
            </div>
          </div>
          <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
      </div>
      <div class="modal fade" id="frozenbox">
        <div class="modal-dialog modal-lg">
          <div class="modal-content bg-info">
            <div class="modal-header">
              <h4 class="modal-title">提示</h4>
              <button id="frozenbox-btn-close" type="button" style="display: none" class="close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
              <div class="text-center">
                <h2 id="frozenbox-content">正在载入数据……</h2>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal fade" id="warningbox">
        <div class="modal-dialog modal-lg">
          <div class="modal-content bg-warning">
            <div class="modal-header">
              <h4 class="modal-title">警告</h4>
              <button id="warningbox-btn-close" type="button" style="display: none" class="close" data-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
              <div class="text-center">
                <h2 id="warningbox-content"></h2>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->

  <!-- Main Footer -->
  <footer class="main-footer">Copyright</footer>
</div>
<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->

<!-- jQuery -->
<script src="/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Select2 -->
<script src="/plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="/plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="/plugins/inputmask/jquery.inputmask.bundle.js"></script>
<script src="/plugins/moment/moment.min.js"></script>
<!-- date-range-picker -->
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>

<!-- AdminLTE -->
<script src="/dist/js/adminlte.js"></script>
<script>
  const navMenuActive="{{.page_id}}";
  const navMenuStatus="{{.navMenuStatus}}";
  // init
  $(function(){
    //Initialize Select2 Elements
    $('.select2').select2({
      theme: 'bootstrap4'
    });
    $('#StudyDate').daterangepicker({
      "locale": {
        "format": "YYYYMMDD",
        "separator": "-",
        "applyLabel": "应用",
        "cancelLabel": "取消",
        "fromLabel": "自",
        "toLabel": "至",
        "customRangeLabel": "Custom",
        "daysOfWeek": [
          "日",
          "一",
          "二",
          "三",
          "四",
          "五",
          "六"
        ],
        "monthNames": [
          "一月",
          "二月",
          "三月",
          "四月",
          "五月",
          "六月",
          "七月",
          "八月",
          "九月",
          "十月",
          "十一月",
          "十二月"
        ],
        "firstDay": 7
      },
      "startDate": "20100101",
      "endDate": "20200101",
      "opens": "center"
    })
  });
</script>
<script src="/webapp/js/ui_common.js"></script>
<script src="{{.custom_scripts}}"></script>

</body>
</html>
